package com.wlyuan.gateway.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author
 * referer 链接判断
 */
@Data
@ConfigurationProperties(prefix = "referer")
@RefreshScope
public class RefererProperties {
    /**
     * true 表示要根据referer来全局控制访问权限。
     * false 表示不需要根据referer来全局控制范文权限
     */
    private boolean overAllState = false;
    private List<String> overAllowedReferer = new ArrayList<>();

    private Map<String,List<String>> singleAllowedReferer = new HashMap();
}
